package com.group02.community.service.impl;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.group02.community.entity.community.ZyRoom;
import com.group02.community.entity.community.ZyUnit;
import com.group02.community.entity.vo.RoomStatusVO;
import com.group02.community.entity.vo.queryVO.UnitQueryVO;
import com.group02.community.mapper.RoomMapper;
import com.group02.community.service.RoomService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class RoomServiceImpl extends ServiceImpl<RoomMapper, ZyRoom> implements RoomService {
    @Autowired
    private RoomMapper roomMapper;
    @Override
    public IPage<ZyRoom> getRoomPageList(Integer currentPage, Integer pageSize, UnitQueryVO unitQueryVO) {
        return roomMapper.getRoomPageList(new Page<>(currentPage,pageSize),unitQueryVO);
    }

    @Override
    public List<RoomStatusVO> getRoomStatusList() {
        return roomMapper.getRoomStatusList();
    }


}
